package top.jacktgq.sxt.bio.error_discrimination;

import java.io.BufferedWriter;
import java.io.ObjectInputStream;
import java.io.OutputStreamWriter;
import java.net.Socket;

/**
 * @Author CandyWall
 * @Date 2019/11/14--13:02
 * @Description 电脑数据显示客户端
 */
public class PcClient {
    public static void main(String[] args) throws Exception {
        Socket client = new Socket("localhost",8888);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
        bw.write("0000a0000b0000c0000d0000e0000f0000g10\n");
        bw.flush();
        ObjectInputStream ois = new ObjectInputStream(client.getInputStream());
        //FIFOImpl<Wavelet_sample_data> wavelet_sample_data_queue = (FIFOImpl<Wavelet_sample_data>) ois.readObject();
        Wavelet_sample_data[] wavelet_sample_datas = (Wavelet_sample_data[]) ois.readObject();
        for (Wavelet_sample_data wavelet_sample_data : wavelet_sample_datas) {
            System.out.println(wavelet_sample_data);
        }

        bw.close();
        ois.close();
        client.close();
    }
}
